import math
import torch


def UserFun(phiL):
    J0 = 250.0
    Aa = 0.118
    phiExt = 1.5
    Eeq = 1.23
    eta = phiExt - Eeq - phiL
    return (-1.0) * J0 * math.pow(10.0, eta / Aa)


def test_torch():
    x = torch.rand(5, 3)
    print(x)

    cudaQ = torch.cuda.is_available()
    print(cudaQ)


if __name__ == '__main__':
    ret = UserFun(0)
    print(ret)
    # ---------------
    test_torch()
    print(math.exp(709))
